/* Copyright (c) 2011 Team A CS2340. All rights reserved.*/

package edu.gatech.teama.doctorsoffice.net;

import edu.gatech.teama.doctorsoffice.model.Appointment;
import edu.gatech.teama.doctorsoffice.server.DataModel;

/**
 * Update an appointment object on the server
 * @author Team A
 * @version $Revision: 1.0 $
 *
 */
public class UpdateAppointmentMessage extends Message {

	/**
	 * Update an appointment on the server
	 * @param appointment appointment to update
	 */
	public UpdateAppointmentMessage(Appointment appointment) {
		super(appointment);
	}
	
	@Override // $codepro.audit.disable methodJavadoc
	public Message handle(DataModel model) {
		model.updateAppointment((Appointment) this.getPayload());
		return new SuccessMessage(true);
	}

}
